package com.zhou.core.logana.repository;

import com.zhou.core.logana.LogAnaResult;
import com.zhou.core.logana.LogRecord;
import com.zhou.util.PropertyFileReader;

/**
 * ���ݴ洢�ӿ�
 * Created by zhouyongjun on 2020/6/12
 */
public interface ILogAnaRepository {
    /***
     * ��������
     * @param records ����List
     * @return
     */
    LogAnaResult saveToList(LogRecord... records);

    /**
     *PropertyFileReader propertyFileReader
     * @param repositoryKey �洢����KEY����CPU
     * @param extraKey ��չKEY ������ʵ����ID
     * @param formatDateNoSpr ʱ���ʽ
     * redis : ����3����ϳ�һ��key:      {repositoryKey}_{extraKey}_{formatDateNoSpr}
     * @param fromIndex LIST��ʼ��
     * @param toIndex   LIST������
     * @return
     */
    LogAnaResult readFromList(String repositoryKey, String extraKey , String formatDateNoSpr, int fromIndex, int toIndex);
    LogAnaResult readFromList(String repositoryPoolName,PropertyFileReader propertyFileReader,String repositoryKey, String extraKey , String formatDateNoSpr, int fromIndex, int toIndex);

    enum LogAnaRepositoryType
    {
        REDIS,
        MYSQL,//|
        HTTP,
        ;
    }

}
